/////////////////////////////////////////////////////////////////////////
//
// Amuse Engine SDK - core/containment
// Copyright( c) 2013.  All Rights Reserved
//
// File:		AEBoundingBox.cpp
// Author:		Gianluca Belardelli
// Date:		01/10/2013
//
/////////////////////////////////////////////////////////////////////////
#include <AEEngine.h>

const AEBoundingBox &AEBoundingBox::CreateEmptyAABB( void )
{
    static AEBoundingBox bbBox;
    return bbBox;
}

AEBOOL32 AEBoundingBox::Intersects( const AEBoundingBox &bbTestBox ) const
{
	// TODO
	/*return ( ( m_vcMin.fX >= bbTestBox.m_vcMin.fX && m_vcMin.fX <= bbTestBox.m_vcMax.fX ) || ( bbTestBox.m_vcMin.fX >= m_vcMin.fX && bbTestBox.m_vcMin.fX <= m_vcMax.fX ) ) &&
	        ( ( m_vcMin.fY >= bbTestBox.m_vcMin.fY && m_vcMin.fY <= bbTestBox.m_vcMax.fY ) || ( bbTestBox.m_vcMin.fY >= m_vcMin.fY && bbTestBox.m_vcMin.fY <= m_vcMax.fY ) ) &&
	        ( ( m_vcMin.fZ >= bbTestBox.m_vcMin.fZ && m_vcMin.fZ <= bbTestBox.m_vcMax.fZ ) || ( bbTestBox.m_vcMin.fZ >= m_vcMin.fZ && bbTestBox.m_vcMin.fZ <= m_vcMax.fZ ) );*/

	return AEFALSE;
}

AEBOOL32 AEBoundingBox::Intersects( const AEBoundingSphere &bsTestSphere ) const
{
	return bsTestSphere.Intersects( *this );
}
